<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>学生管理</title>
    <link rel="shortcut icon" href="../../static/img/icon.svg">
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
    <link rel="stylesheet" href="../../static/html5up-forty/assets/css/main.css"/>
    <noscript>
        <link rel="stylesheet" href="../../static/html5up-forty/assets/css/noscript.css"/>
    </noscript>
</head>
<body class="is-preload">
    <div id="wrapper">
        <!-- Header -->
        <header id="header" class="alt">
            <a th:href="@{|/manage|}" class="logo"><strong>Jli</strong> <span>by my</span></a>
            <nav>
                <p style="font-size: 15px" th:text="${session.teacher.getName()} + 老师"></p>
                <a href="#menu">菜单</a>
            </nav>
        </header>

        <!-- Menu -->
        <nav id="menu">
            <ul class="links">
                <li><a th:href="@{|/manage|}">主页</a></li>
                <li><a href="#">编辑信息</a></li>
                <li><a href="#">修改密码</a></li>
            </ul>
            <ul class="actions stacked">
                <li><a th:href="@{|/teacherLogout|}" class="button fit">退出登录</a></li>
            </ul>
        </nav>

        <!-- Banner -->
        <section id="banner" class="major">
            <div class="inner">
                <header class="major">
                    <h1>学生信息管理</h1>
                </header>
                <div class="content">
                    <ul class="actions">
                        <li><a th:href="@{|/manage|}" class="button next scrolly">返回首页</a></li>
                    </ul>
                </div>
            </div>
        </section>


        <!-- Main -->
        <div id="main">

            <!-- One -->

            <section id="one" class="inner">

                <form id="form">
                    <input type="hidden" th:value="${session.teacher.getId()}" id="tid">
                    <div class="row gtr-uniform">
                        <div class="col-3 col-6-xsmall">
                            <select name="sex" class="small" id="sex">
                                <option value="">请选择性别</option>
                                <option value="0">男</option>
                                <option value="1">女</option>
                            </select>
                        </div>
                        <div class="col-3 col-6-xsmall">
                            <select name="grade" id="grade" class="small" >
                                <option value="">请选择年级</option>
                            </select>
                        </div>
                        <div class="col-3 col-6-xsmall">
                            <select name="clazz" id="clazz" class="small">
                                <option value="">请选择班级</option>
                            </select>
                        </div>
                    </div>
                    <br>
                    <div class="row gtr-uniform">
                        <div class="col-3 col-6-xsmall">
                            <input type="text" name="num" placeholder="学号" id="num" autocomplete="off"/>
                        </div>
                        <div class="col-3 col-6-xsmall">
                            <input type="text" name="name" placeholder="姓名" id="name" autocomplete="off"/>
                        </div>

                    </div>
                    <br>
                    <div class="row gtr-uniform">
                        <div class="col-12 col-3-xsmall">
                            <a class="button primary icon solid fa-search" onclick="loadTable()">查询</a>
                            <a class="button icon solid fa-recycle" onclick="reset()">重置</a>
                            <a class="button" th:href="@{|/toAddStu|}">添加学生</a>
                        </div>
                    </div>
                </form>

                <h4>学生表</h4>
                <div class="table-wrapper">
                    <table>
                        <thead>
                        <tr>
                            <th>学生编号</th>
                            <th>学号</th>
                            <th>姓名</th>
                            <th>性别</th>
                            <th>年级</th>
                            <th>班级</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="stuTable">

                        </tbody>
                    </table>
                    <ul class="pagination" id="pagination">

                    </ul>
                </div>
            </section>

            <!-- Contact -->
            <section id="contact">

            </section>

            <!-- Footer -->
            <footer id="footer">
                <div class="inner">
                    <ul class="icons">
                        <li><a href="#" class="icon brands alt fa-github"><span class="label">GitHub</span></a></li>
                    </ul>
                    <ul class="copyright">
                        <li>&copy; xxx</li><li>制作: <a href="#">my</a></li>
                    </ul>
                </div>
            </footer>
    </div>

        <!-- Scripts -->
        <script src="../../static/html5up-forty/assets/js/jquery.min.js"></script>
        <script src="../../static/html5up-forty/assets/js/jquery.scrolly.min.js"></script>
        <script src="../../static/html5up-forty/assets/js/jquery.scrollex.min.js"></script>
        <script src="../../static/html5up-forty/assets/js/browser.min.js"></script>
        <script src="../../static/html5up-forty/assets/js/breakpoints.min.js"></script>
        <script src="../../static/html5up-forty/assets/js/util.js"></script>
        <script src="../../static/html5up-forty/assets/js/main.js"></script>
        <script src="../../static/js/util.js"></script>
        <script src="../../static/js/manage_stu.js"></script>
        <script>
            $(function (){
                getGrade();
                getClazz();
                loadTable(0);
            });
        </script>
</div>
</body>
</html>